/**
 * 
 */
package nc.tb.analyse.ui;

import javax.swing.JPanel;

import nc.tb.app.CommonPlan;
import nc.tb.chartreport.IChartRptConst;
import nc.tb.chartreport.ReportFormat;
import nc.ui.pub.beans.UIPanel;

/**
 * @author xuzx
 *
 */
public class AnalyseStdReportPnl extends UIPanel {

	private ReportFormat reportFmt = null;
	
	private CommonPlan cubeObj = null;
 
	/**
	 * @param reportFmt
	 * @param cubeModel
	 */
	public AnalyseStdReportPnl(ReportFormat reportFmt, CommonPlan cubeObj) {
		this.reportFmt = reportFmt;
		this.cubeObj = cubeObj;
		init();
	}

	/**
	 * 
	 *
	 */
	private void init() {
//		if(reportFmt == null || cubeObj == null){
//			return;
//		}
//		
//		String areaFrame = reportFmt.getAreaFrame().trim();
//		AssembledFrame fmtPnl = new AssembledFrame(areaFrame);
//		UIPanel[] innerPnl = fmtPnl.getInnerPanel();
//		if(innerPnl != null){
////			HashMap<String, String> hmArea2Fmt = reportFmt.getHmArea2Format();
//			if(hmArea2Fmt != null){
//				for(int i=0 ; i<innerPnl.length ; i++){
//					UIPanel pnl = innerPnl[i];
//					String pnlName = pnl.getName();
//					String fmt = hmArea2Fmt.get(pnlName);
//					JPanel disPnl = getAreaPnl(fmt);
//					pnl.setLayout(new BorderLayout());
//					pnl.add(disPnl, BorderLayout.CENTER);
//				} // end for(i)
//			} // end if(hmArea2Fmt != null)
//		} // end if(innerPnl != null)
	}

	/**
	 * 
	 * @param fmt
	 * @return
	 */
	private JPanel getAreaPnl(String fmt) {
		if(fmt != null){
			String[] fmtStr = fmt.split(IChartRptConst.SEP_AT);
			if(fmtStr != null && fmtStr.length > 1){
				String disType = fmtStr[0];
				String disCond = fmtStr[1];
//				getAreaPnlByCondition(disType, disCond, reportFmt.isOLAPView());
			} // end if(fmtStr != null && fmtStr.length > 1)
		} // end if(fmt != null)
		return null;
	}

	/**
	 * 
	 * @param disType
	 * @param disCond
	 * @param b
	 */
	private void getAreaPnlByCondition(String disType, String disCond, boolean isOLAPView) {
		if(isOLAPView){
			
		}
		else{
			
		} // end if(isOLAPView == true)
	}
	
} // end class
